package org.linlinjava.litemall.db.dao.divided;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.AgedmallPromoteUserSettlement;
import org.linlinjava.litemall.db.domain.AgedmallPromoteWithdrawalRecord;
import org.linlinjava.litemall.db.vo.app.*;

import java.math.BigDecimal;
import java.util.List;

public interface AgedmallInfoPromoteUserSettlementMapper {

    List<SettleStatisticsVo> getSettleStatisticsVo(@Param("userId") Integer userId, @Param("year") Integer year);

    BigDecimal getSettleByYearMonth(@Param("userId") Integer userId, @Param("year") Integer year, @Param("month") Integer month);

    List<ProxyMoneyVo> getProxyMoneyVoList(@Param("userId") Integer userId, @Param("year") Integer year, @Param("month") Integer month, @Param("item") Byte item);

    /**
     * 查询分成信息
     * @param diviedQuery
     * @return
     */
    List<AgedmallPromoteUserSettlementDto> getPromoteUserSettleMent(DiviedQuery diviedQuery);


    List<AgedmallPromoteWithdrawalRecord> getWithdrawalRecodrInfo();

    /**
     * 结算上个月
     * @param time
     * @return
     */
    List<AgedmallPromoteUserSettlement> getPromoteUserSettlementMonth(@Param("time") String time);


    /**
     * 统计某个月的分成总金额
     * @param userId
     * @param year
     * @param month
     * @return
     */
    BigDecimal getProxyMoneyMontyProxy(@Param("userId") Integer userId, @Param("year") Integer year, @Param("month") Integer month);


    /**
     * 根据某个订单编号统计分成佣金总金额
     * @param settleMentId
     * @return
     */
    BigDecimal getpromoteSumMoney(@Param("settleMentId") Integer settleMentId);

    /**
     * 统计订单总金额(包括服务订单)
     * @param childOrderCode
     * @return
     */
    OrderSumMoneryDto getOrderSumMoney(@Param("childOrderCode") String childOrderCode);

}